package org.pearl.thread.demo.test001;

/**
 * Created by TD on 2021/4/9
 */
public class Test001 {
    public static void main(String[] args) {
        MyThread001 thread001 = new MyThread001();
        // 设置优先级最高
        thread001.setPriority(Thread.MAX_PRIORITY);
        thread001.start();
        // 设置优先级最低
        Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
        // 打印优先级
        System.out.println("thread001优先级："+thread001.getPriority());
        System.out.println("Main 优先级："+Thread.currentThread().getPriority());
        System.out.println(Thread.currentThread().getName() + "线程正在运行任务");
    }
}
